function ispali (str)
	if #str == 0 or #str == 1 then
		return true
	else
		for i = 1, #str / 2 do
			if string.byte(str, i) ~= string.byte(str, -i) then
				return false
			end
		end
		return true
	end
end

-- test
print(ispali("step on no pets"))
print(ispali("banana"))
